<h1>Relat&oacute;rio</h1>

<div id='infovis'></div>

<script>
    var RELDATA = [
        <?php foreach($dados as $dado) {?>
            ['<?=$dado->titulo?>', <?=$dado->num?>],
        <?php } ?>
    ]
    $(function(){
        $('#infovis').highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: 1,
                plotShadow: false
            },
            title: {
                text: 'Quantidade de chamados por servi\u00E7o'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.y}</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                name: 'Chamados por servico',
                data: RELDATA
            }]
        });
    });
</script>